package demo;

import java.util.IdentityHashMap;

public class Demo1 {
    public static void main(String[] args) throws InterruptedException {
        Object object = new Object();
        Thread thread = new Thread(() -> {
            synchronized (object){
                System.out.println("wait 之前");
                try {
                    object.wait();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println("wait 之后");
            }
        });
        thread.start();
        System.out.println(thread.getState());
//        object.notify();
        Thread.sleep(1000);
        System.out.println(thread.getState());
    }
}
